package com.accedo.achievements.dataaccess.model;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.springframework.stereotype.Component;

@Component
@Entity
@Table(name="t_app")
public class App implements Serializable {

	private static final long serialVersionUID = -5670312422454506403L;
	private int id; //generated by native
	private String app_sn; //unique & not-null
	private String app_name; // not-null
	
	@Id
	@GeneratedValue
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	
	@Column(unique=true,
			nullable=false)
	public String getApp_sn() {
		return app_sn;
	}
	public void setApp_sn(String app_sn) {
		this.app_sn = app_sn;
	}
	
	@Column(nullable=false)
	public String getApp_name() {
		return app_name;
	}
	public void setApp_name(String app_name) {
		this.app_name = app_name;
	}
	
}
